package cn.zc.boot.service;

import cn.zc.boot.api.UserService;
import cn.zc.boot.entity.User;
import cn.zc.boot.mapper.UserMapper;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Resource;

/**
 * Created by zhengchuan on 2017/3/8.
 */
@Component
@Service(version = "1.0.0")
public class UserServiceImpl implements UserService {
    private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
    @Resource
    private UserMapper userMapper;

    @Override
    public User findUserById(Long id) {
        User user = new User();
        user.setId(id);
        user.setUsername("郑川");
        user.setPassword("123456");
        user.setPhone("18275288417");
        return user;
    }

    @Override
    public int getUserCount() {
        return userMapper.getUserCount();
    }
}
